/*LICENSE_BEGIN
 * ******************************************************************
 * Copyright 2006 by the Dainamite Robocup-Team at the
 * DAI-Labor, TU-Berlin (www.dai-labor.de)
 * 
 * Members of Dainamite are:
 * Holger Endert
 * Robert Wetzker
 * Thomas Karbe
 * Axel Heßler
 * Philippe Bütter
 * Felix Brossmann
 * 
 * Licensed under the GNU GPL (General Public License) Free Software 
 * License, Version 2. You may use this file only in compliance with 
 * the License. You may obtain a copy of the License at:
 * 
 * http://www.fsf.org/licensing/licenses/gpl.txt
 * ******************************************************************
LICENSE_END*/
/* Generated By:JavaCC: Do not edit this line. CoachParser.java */
                           // Robocup Message Parser
package robocup.parser9;

// Infotype for this parser
import robocup.component.infotypes.CoachVisualInfo;
import robocup.component.infotypes.CoachPlayerSayInfo;
import robocup.component.infotypes.Info;
import java.io.StringReader;
import robocup.component.AbstractAgent;

/**
 * The Parser containing all sub-parsers required for the coach. This class is 
 * created by the javacc parser generator. Therefore do not change this class 
 * directly, but change the CoachParser.jj and regenerate the code afterwards.
 */
public class CoachParser extends RobocupParser implements CoachParserConstants {

        /**
	 * A reference to the Agent, which contains this parser.
	 */
        AbstractAgent rc;

        /**
	 * The command to pasre.
	 */
        String cmd;

        /**
	 * The Param-Parser.
	 */
        ParamParser pp;

        /**
	 * The Hear-Parser.
	 */
        HearParser hp;

        /**
	 * The Other-Parser.
	 */
        OtherParser op;

        /**
	 * An info-object for visual information. Differs from usual
	 * visual infos, because the coach sees all.
	 */
        CoachVisualInfo cvi; // = new CoachVisualInfo(0,null);

        /**
	 * An info-object for returning the other infos.
	 */
        Info info = null;

        /**
	 * Creates a new instance of the parser.
	 * @param - StringReader - reader for accessing strings
	 * @param - AbstractAgent - the agent object containing this parser
	 */
        public CoachParser(StringReader str, AbstractAgent rc) {
                this(str);
                this.rc = rc;
                pp = new ParamParser(new StringReader(""), rc);
                hp = new HearParser(new StringReader(""), rc);
                op = new OtherParser(new StringReader(""), rc);
                cvi = new CoachVisualInfo(0,rc.getTeamName());
        }

        /**
	 * Method that parses a command.
	 * @param - the message to parse
	 * @return - the corresponding info-object.
	 */
        public Info parseCommand(String cmd) throws ParseException{
        ReInit(new StringReader(cmd));
        info = null;
        cvi.reset();
        this.cmd = cmd;
                try {
                        startParseCoachCommand();
                } catch (ParseException e)
                {
                        System.out.println("Exception during Parsing with Command:");
                        System.out.println("  " + cmd +"\r\n"+ e);
                        e.printStackTrace();
                }
                return info;
        }

  final public String quotedString() throws ParseException {
        Token tmp;
    tmp = jj_consume_token(STRING);
                 {if (true) return tmp.image.substring(1,tmp.image.length()-1);}
    throw new Error("Missing return statement in function");
  }

  final public String miscString() throws ParseException {
        StringBuffer buf = new StringBuffer();
        Token tmp;
    label_1:
    while (true) {
      switch (jj_nt.kind) {
      case OB:
      case CB:
      case SEP:
      case QM:
      case NAM:
        ;
        break;
      default:
        jj_la1[0] = jj_gen;
        break label_1;
      }
      switch (jj_nt.kind) {
      case QM:
        tmp = jj_consume_token(QM);
        break;
      case OB:
        tmp = jj_consume_token(OB);
        break;
      case CB:
        tmp = jj_consume_token(CB);
        break;
      case SEP:
        tmp = jj_consume_token(SEP);
        break;
      case NAM:
        tmp = jj_consume_token(NAM);
        break;
      default:
        jj_la1[1] = jj_gen;
        jj_consume_token(-1);
        throw new ParseException();
      }
                                                          buf.append(tmp.image);
    }
    jj_consume_token(0);
         {if (true) return buf.toString();}
    throw new Error("Missing return statement in function");
  }

  final public void startParseCoachCommand() throws ParseException {
    jj_consume_token(OB);
    switch (jj_nt.kind) {
    case HEAR:
      hear();
      break;
    case SEE_GLOBAL:
      seeGlobal();
      break;
    case OK:
    case CHANGE_PLAYER_TYPE:
    case SCORE:
    case RECONNECT:
    case EYE:
      other();
      break;
    case ERROR:
      error();
      break;
    case WARNING:
      warning();
      break;
    case SERVER_PARAM:
    case PLAYER_PARAM:
    case PLAYER_TYPE:
      param();
      break;
    case INIT:
      init();
      break;
    case CLANG:
      clang();
      break;
    default:
      jj_la1[2] = jj_gen;
      jj_consume_token(-1);
      throw new ParseException();
    }
  }

  final public void ok() throws ParseException {
    jj_consume_token(OK);
    jj_consume_token(SEP);
    switch (jj_nt.kind) {
    case LOOK:
      look();
      break;
    case TEAM_NAMES:
      jj_consume_token(TEAM_NAMES);
      break;
    case MOVE:
      jj_consume_token(MOVE);
      break;
    case CHANGE_MODE:
      jj_consume_token(CHANGE_MODE);
      break;
    case CHANGE_PLAYER_TYPE:
      jj_consume_token(CHANGE_PLAYER_TYPE);
      jj_consume_token(SEP);
      jj_consume_token(NUM);
      switch (jj_nt.kind) {
      case SEP:
        jj_consume_token(SEP);
        jj_consume_token(NUM);
        break;
      default:
        jj_la1[3] = jj_gen;
        ;
      }
      break;
    case EYE:
      jj_consume_token(EYE);
      jj_consume_token(SEP);
      switch (jj_nt.kind) {
      case ON:
        jj_consume_token(ON);
        break;
      case OFF:
        jj_consume_token(OFF);
        break;
      default:
        jj_la1[4] = jj_gen;
        jj_consume_token(-1);
        throw new ParseException();
      }
      break;
    case EAR:
      jj_consume_token(EAR);
      jj_consume_token(SEP);
      switch (jj_nt.kind) {
      case ON:
        jj_consume_token(ON);
        break;
      case OFF:
        jj_consume_token(OFF);
        break;
      default:
        jj_la1[5] = jj_gen;
        jj_consume_token(-1);
        throw new ParseException();
      }
      break;
    case COMPRESSION:
      jj_consume_token(COMPRESSION);
      jj_consume_token(SEP);
      jj_consume_token(NUM);
      break;
    case CHECK_BALL:
      jj_consume_token(CHECK_BALL);
      break;
    case SAY:
      jj_consume_token(SAY);
      break;
    case RECOVER:
      jj_consume_token(RECOVER);
      break;
    case START:
      jj_consume_token(START);
      break;
    case 0:
    case OB:
    case CB:
    case SEP:
    case QM:
    case NAM:
      miscString();
      break;
    default:
      jj_la1[6] = jj_gen;
      jj_consume_token(-1);
      throw new ParseException();
    }
    jj_consume_token(CB);
  }

  final public void clang() throws ParseException {
    jj_consume_token(CLANG);
    jj_consume_token(SEP);

  }

  final public void hear() throws ParseException {
        Token num = null;
    jj_consume_token(HEAR);
    jj_consume_token(SEP);
    switch (jj_nt.kind) {
    case NUM:
      num = jj_consume_token(NUM);
      jj_consume_token(SEP);
      switch (jj_nt.kind) {
      case OB:
        hearPlayer(Integer.parseInt(num.image));
        break;
      case REFEREE:
        hearReferee();
        break;
      case SELF:
        jj_consume_token(SELF);
        jj_consume_token(SEP);
        jj_consume_token(STRING);
        break;
      default:
        jj_la1[7] = jj_gen;
        jj_consume_token(-1);
        throw new ParseException();
      }
      break;
    case OB:
      hearPlayerTraining();
      break;
    case REFEREE:
      hearRefereeTraining();
      break;
    case OLCOACHL:
      jj_consume_token(OLCOACHL);
      break;
    case OLCOACHR:
      jj_consume_token(OLCOACHR);
      break;
    default:
      jj_la1[8] = jj_gen;
      jj_consume_token(-1);
      throw new ParseException();
    }
  }

  final public void hearReferee() throws ParseException {
    jj_consume_token(REFEREE);
                  info = hp.parseHear(cmd.substring(6, cmd.length()-1));
  }

  final public void hearRefereeTraining() throws ParseException {
        Token num;
    jj_consume_token(REFEREE);
    jj_consume_token(SEP);
    num = jj_consume_token(NUM);
                                 info = hp.parseHear(num.image+" referee "+cmd.substring((15+num.image.length()), cmd.length()-1));
  }

  final public void hearPlayer(int cycle) throws ParseException {
        String team; Token num; String msg;
    jj_consume_token(OB);
    jj_consume_token(PLAYER);
    jj_consume_token(SEP);
    team = quotedString();
    jj_consume_token(SEP);
    num = jj_consume_token(NUM);
    switch (jj_nt.kind) {
    case SEP:
      jj_consume_token(SEP);
      jj_consume_token(GOALIE);
      break;
    default:
      jj_la1[9] = jj_gen;
      ;
    }
    jj_consume_token(CB);
    jj_consume_token(SEP);
    msg = quotedString();
    jj_consume_token(CB);
                if(team.equals(rc.getTeamName())) {
                        info = new CoachPlayerSayInfo(cycle,Integer.parseInt(num.image),msg);
                }
  }

  final public void hearPlayerTraining() throws ParseException {
        String team; Token num; Token cycle; String msg;
    jj_consume_token(OB);
    jj_consume_token(PLAYER);
    jj_consume_token(SEP);
    team = quotedString();
    jj_consume_token(SEP);
    num = jj_consume_token(NUM);
    switch (jj_nt.kind) {
    case SEP:
      jj_consume_token(SEP);
      jj_consume_token(GOALIE);
      break;
    default:
      jj_la1[10] = jj_gen;
      ;
    }
    jj_consume_token(CB);
    jj_consume_token(SEP);
    cycle = jj_consume_token(NUM);
    jj_consume_token(SEP);
    msg = quotedString();
    jj_consume_token(CB);
                if(team.equals(rc.getTeamName())) {
                        info = new CoachPlayerSayInfo(Integer.parseInt(cycle.image),Integer.parseInt(num.image),msg);
                }
  }

  final public void seeGlobal() throws ParseException {
        Token cycle; int iCycle;
    jj_consume_token(SEE_GLOBAL);
    jj_consume_token(SEP);
    cycle = jj_consume_token(NUM);
                                     iCycle=Integer.parseInt(cycle.image); cvi.setCycle(iCycle);
    label_2:
    while (true) {
      switch (jj_nt.kind) {
      case SEP:
        ;
        break;
      default:
        jj_la1[11] = jj_gen;
        break label_2;
      }
      jj_consume_token(SEP);
      objects(iCycle);
    }
    jj_consume_token(CB);
                info = cvi;
  }

  final public void error() throws ParseException {
    jj_consume_token(ERROR);
                 System.out.println("Error! Following error message was sent by the server: " + cmd);
  }

  final public void warning() throws ParseException {
    jj_consume_token(WARNING);
                   System.out.println("Warning! Following warning message was sent by the server: " + cmd);
  }

  final public void look() throws ParseException {
        Token cycle;
    jj_consume_token(LOOK);
    jj_consume_token(SEP);
    cycle = jj_consume_token(NUM);
    jj_consume_token(SEP);
    label_3:
    while (true) {
      switch (jj_nt.kind) {
      case OB:
        ;
        break;
      default:
        jj_la1[12] = jj_gen;
        break label_3;
      }
      objects(Integer.parseInt(cycle.image));
      jj_consume_token(SEP);
    }
    jj_consume_token(CB);
  }

  final public void objects(int cycle) throws ParseException {
    jj_consume_token(OB);
    jj_consume_token(OB);
    switch (jj_nt.kind) {
    case PLAYER:
      player(cycle);
      break;
    case BALL:
      ball(cycle);
      break;
    case GOAL:
      goal();
      break;
    default:
      jj_la1[13] = jj_gen;
      jj_consume_token(-1);
      throw new ParseException();
    }
    jj_consume_token(CB);
  }

  final public void player(int cycle) throws ParseException {
        Token num=null; boolean goalie = false; int iNum; String sTeamName = new String("");
        Token xPos=null; Token yPos=null;Token xVel=null; Token yVel=null; Token bodyAngel; Token headAngel;
        Token pointDir=null; boolean tackle=false;
        double dxPos; double dyPos; double dxVel; double dyVel; double dBodyAngel; double dHeadAngel; double dPointDir=-999.99;
    jj_consume_token(PLAYER);
    jj_consume_token(SEP);
    sTeamName = quotedString();
    jj_consume_token(SEP);
    num = jj_consume_token(NUM);
    switch (jj_nt.kind) {
    case SEP:
      jj_consume_token(SEP);
      jj_consume_token(GOALIE);
                                                                          goalie=true;
      break;
    default:
      jj_la1[14] = jj_gen;
      ;
    }
    jj_consume_token(CB);
    jj_consume_token(SEP);
    xPos = jj_consume_token(NUM);
    jj_consume_token(SEP);
    yPos = jj_consume_token(NUM);
    jj_consume_token(SEP);
    xVel = jj_consume_token(NUM);
    jj_consume_token(SEP);
    yVel = jj_consume_token(NUM);
    jj_consume_token(SEP);
    bodyAngel = jj_consume_token(NUM);
    jj_consume_token(SEP);
    headAngel = jj_consume_token(NUM);
    switch (jj_nt.kind) {
    case SEP:
      jj_consume_token(SEP);
      break;
    default:
      jj_la1[15] = jj_gen;
      ;
    }
    switch (jj_nt.kind) {
    case NUM:
      pointDir = jj_consume_token(NUM);
      switch (jj_nt.kind) {
      case SEP:
        jj_consume_token(SEP);
        break;
      default:
        jj_la1[16] = jj_gen;
        ;
      }
      break;
    default:
      jj_la1[17] = jj_gen;
      ;
    }
    switch (jj_nt.kind) {
    case TACKLE:
      jj_consume_token(TACKLE);
                                                tackle=true;
      break;
    default:
      jj_la1[18] = jj_gen;
      ;
    }
                iNum = Integer.parseInt(num.image); dxPos=Double.parseDouble(xPos.image);
                dyPos=Double.parseDouble(yPos.image); dxVel=Double.parseDouble(xVel.image); dyVel=Double.parseDouble(yVel.image);
                dBodyAngel=Double.parseDouble(bodyAngel.image); dHeadAngel=Double.parseDouble(headAngel.image);
                if(pointDir!=null)
                        dPointDir=Double.parseDouble(pointDir.image);
                if(sTeamName.equals(rc.getTeamName()))
                        {cvi.addPlayer(sTeamName, true, cycle,dyPos,dxPos,dyVel,dxVel,iNum,dBodyAngel,dHeadAngel,dPointDir,goalie, tackle);}
                else
                        { // controller.infoSeeOtherTeamName(sTeamName);
                                cvi.addPlayer(sTeamName, false,cycle,dyPos,dxPos,dyVel,dxVel,iNum,dBodyAngel,dHeadAngel,dPointDir, goalie, tackle);
                                cvi.setOtherTeamName(sTeamName);
                        }
  }

  final public void ball(int cycle) throws ParseException {
        Token xPos=null; Token yPos=null;Token xVel=null; Token yVel=null;
        double dxPos; double dyPos; double dxVel; double dyVel;
    jj_consume_token(BALL);
    jj_consume_token(CB);
    jj_consume_token(SEP);
    xPos = jj_consume_token(NUM);
    jj_consume_token(SEP);
    yPos = jj_consume_token(NUM);
    jj_consume_token(SEP);
    xVel = jj_consume_token(NUM);
    jj_consume_token(SEP);
    yVel = jj_consume_token(NUM);
                dxPos=Double.parseDouble(xPos.image); dyPos=Double.parseDouble(yPos.image); dxVel=Double.parseDouble(xVel.image); dyVel=Double.parseDouble(yVel.image);
                cvi.setBall(cycle,dyPos,dxPos,dyVel,dxVel);
  }

  final public void goal() throws ParseException {
    jj_consume_token(GOAL);
    jj_consume_token(SEP);
    switch (jj_nt.kind) {
    case LEFT:
      jj_consume_token(LEFT);
      break;
    case RIGHT:
      jj_consume_token(RIGHT);
      break;
    default:
      jj_la1[19] = jj_gen;
      jj_consume_token(-1);
      throw new ParseException();
    }
    jj_consume_token(CB);
    jj_consume_token(SEP);
    jj_consume_token(NUM);
    jj_consume_token(SEP);
    jj_consume_token(NUM);
  }

  final public void param() throws ParseException {
    switch (jj_nt.kind) {
    case SERVER_PARAM:
      jj_consume_token(SERVER_PARAM);
                               info = pp.parseServerParam(cmd.substring(14, cmd.length()-1));
      break;
    case PLAYER_PARAM:
      jj_consume_token(PLAYER_PARAM);
                               info = pp.parsePlayerParam(cmd.substring(14, cmd.length()-1));
      break;
    case PLAYER_TYPE:
      jj_consume_token(PLAYER_TYPE);
                              info = pp.parsePlayerType(cmd.substring(13, cmd.length()-1));
      break;
    default:
      jj_la1[20] = jj_gen;
      jj_consume_token(-1);
      throw new ParseException();
    }
  }

  final public void init() throws ParseException {
        Token side=null;
    jj_consume_token(INIT);
    jj_consume_token(SEP);
    switch (jj_nt.kind) {
    case LEFT:
    case RIGHT:
      switch (jj_nt.kind) {
      case LEFT:
        side = jj_consume_token(LEFT);
        break;
      case RIGHT:
        side = jj_consume_token(RIGHT);
        break;
      default:
        jj_la1[21] = jj_gen;
        jj_consume_token(-1);
        throw new ParseException();
      }
      jj_consume_token(SEP);
      break;
    default:
      jj_la1[22] = jj_gen;
      ;
    }
    switch (jj_nt.kind) {
    case OK:
      jj_consume_token(OK);
      break;
    case 0:
    case OB:
    case CB:
    case SEP:
    case QM:
    case NAM:
      miscString();
                                                                       System.out.println("Init Fehler");
      break;
    default:
      jj_la1[23] = jj_gen;
      jj_consume_token(-1);
      throw new ParseException();
    }
                if (side != null)
                        rc.setTeamEast(side.image.charAt(0) == 'r');
  }

  final public void other() throws ParseException {
    switch (jj_nt.kind) {
    case RECONNECT:
      jj_consume_token(RECONNECT);
                            info = hp.parseReconnect(cmd.substring(11, cmd.length()-1));
      break;
    case SCORE:
      jj_consume_token(SCORE);
                        info = op.parseScore(cmd.substring(7, cmd.length()-1));
      break;
    case OK:
      ok();
      break;
    case CHANGE_PLAYER_TYPE:
      jj_consume_token(CHANGE_PLAYER_TYPE);
      jj_consume_token(SEP);
      jj_consume_token(NUM);
      switch (jj_nt.kind) {
      case SEP:
        jj_consume_token(SEP);
        jj_consume_token(NUM);
        break;
      default:
        jj_la1[24] = jj_gen;
        ;
      }
      jj_consume_token(CB);
      break;
    case EYE:
      jj_consume_token(EYE);
      jj_consume_token(SEP);
      switch (jj_nt.kind) {
      case ON:
        jj_consume_token(ON);
        break;
      case OFF:
        jj_consume_token(OFF);
        break;
      default:
        jj_la1[25] = jj_gen;
        jj_consume_token(-1);
        throw new ParseException();
      }
      jj_consume_token(CB);
      break;
    default:
      jj_la1[26] = jj_gen;
      jj_consume_token(-1);
      throw new ParseException();
    }
  }

  public CoachParserTokenManager token_source;
  SimpleCharStream jj_input_stream;
  public Token token, jj_nt;
  private int jj_gen;
  final private int[] jj_la1 = new int[27];
  static private int[] jj_la1_0;
  static private int[] jj_la1_1;
  static {
      jj_la1_0();
      jj_la1_1();
   }
   private static void jj_la1_0() {
      jj_la1_0 = new int[] {0x0,0x0,0x7eff0,0x0,0x180000,0x180000,0x7fa41201,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x80000000,0x1c000,0x80000000,0x80000000,0x11,0x0,0x180000,0x40e10,};
   }
   private static void jj_la1_1() {
      jj_la1_1 = new int[] {0x19c00,0x19c00,0x0,0x1000,0x0,0x0,0x19c00,0x448,0x4438,0x1000,0x1000,0x1000,0x400,0x86,0x1000,0x1000,0x1000,0x4000,0x100,0x1,0x0,0x1,0x1,0x19c00,0x1000,0x0,0x0,};
   }

  public CoachParser(java.io.InputStream stream) {
     this(stream, null);
  }
  public CoachParser(java.io.InputStream stream, String encoding) {
    try { jj_input_stream = new SimpleCharStream(stream, encoding, 1, 1); } catch(java.io.UnsupportedEncodingException e) { throw new RuntimeException(e); }
    token_source = new CoachParserTokenManager(jj_input_stream);
    token = new Token();
    token.next = jj_nt = token_source.getNextToken();
    jj_gen = 0;
    for (int i = 0; i < 27; i++) jj_la1[i] = -1;
  }

  public void ReInit(java.io.InputStream stream) {
     ReInit(stream);
  }
  public void ReInit(java.io.InputStream stream, String encoding) {
    try { jj_input_stream.ReInit(stream, encoding, 1, 1); } catch(java.io.UnsupportedEncodingException e) { throw new RuntimeException(e); }
    token_source.ReInit(jj_input_stream);
    token = new Token();
    token.next = jj_nt = token_source.getNextToken();
    jj_gen = 0;
    for (int i = 0; i < 27; i++) jj_la1[i] = -1;
  }

  public CoachParser(java.io.Reader stream) {
    jj_input_stream = new SimpleCharStream(stream, 1, 1);
    token_source = new CoachParserTokenManager(jj_input_stream);
    token = new Token();
    token.next = jj_nt = token_source.getNextToken();
    jj_gen = 0;
    for (int i = 0; i < 27; i++) jj_la1[i] = -1;
  }

  public void ReInit(java.io.Reader stream) {
    jj_input_stream.ReInit(stream, 1, 1);
    token_source.ReInit(jj_input_stream);
    token = new Token();
    token.next = jj_nt = token_source.getNextToken();
    jj_gen = 0;
    for (int i = 0; i < 27; i++) jj_la1[i] = -1;
  }

  public CoachParser(CoachParserTokenManager tm) {
    token_source = tm;
    token = new Token();
    token.next = jj_nt = token_source.getNextToken();
    jj_gen = 0;
    for (int i = 0; i < 27; i++) jj_la1[i] = -1;
  }

  public void ReInit(CoachParserTokenManager tm) {
    token_source = tm;
    token = new Token();
    token.next = jj_nt = token_source.getNextToken();
    jj_gen = 0;
    for (int i = 0; i < 27; i++) jj_la1[i] = -1;
  }

  final private Token jj_consume_token(int kind) throws ParseException {
    Token oldToken = token;
    if ((token = jj_nt).next != null) jj_nt = jj_nt.next;
    else jj_nt = jj_nt.next = token_source.getNextToken();
    if (token.kind == kind) {
      jj_gen++;
      return token;
    }
    jj_nt = token;
    token = oldToken;
    jj_kind = kind;
    throw generateParseException();
  }

  final public Token getNextToken() {
    if ((token = jj_nt).next != null) jj_nt = jj_nt.next;
    else jj_nt = jj_nt.next = token_source.getNextToken();
    jj_gen++;
    return token;
  }

  final public Token getToken(int index) {
    Token t = token;
    for (int i = 0; i < index; i++) {
      if (t.next != null) t = t.next;
      else t = t.next = token_source.getNextToken();
    }
    return t;
  }

  private java.util.Vector jj_expentries = new java.util.Vector();
  private int[] jj_expentry;
  private int jj_kind = -1;

  public ParseException generateParseException() {
    jj_expentries.removeAllElements();
    boolean[] la1tokens = new boolean[50];
    for (int i = 0; i < 50; i++) {
      la1tokens[i] = false;
    }
    if (jj_kind >= 0) {
      la1tokens[jj_kind] = true;
      jj_kind = -1;
    }
    for (int i = 0; i < 27; i++) {
      if (jj_la1[i] == jj_gen) {
        for (int j = 0; j < 32; j++) {
          if ((jj_la1_0[i] & (1<<j)) != 0) {
            la1tokens[j] = true;
          }
          if ((jj_la1_1[i] & (1<<j)) != 0) {
            la1tokens[32+j] = true;
          }
        }
      }
    }
    for (int i = 0; i < 50; i++) {
      if (la1tokens[i]) {
        jj_expentry = new int[1];
        jj_expentry[0] = i;
        jj_expentries.addElement(jj_expentry);
      }
    }
    int[][] exptokseq = new int[jj_expentries.size()][];
    for (int i = 0; i < jj_expentries.size(); i++) {
      exptokseq[i] = (int[])jj_expentries.elementAt(i);
    }
    return new ParseException(token, exptokseq, tokenImage);
  }

  final public void enable_tracing() {
  }

  final public void disable_tracing() {
  }

}
